package com.edu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Data;

/**
 * 教材发放记录表
 * @TableName textbook_issue
 */
@TableName(value ="textbook_issue")
@Data
public class TextbookIssue {
    /**
     * 发放记录ID
     */
    @TableId(type = IdType.AUTO)
    private Long issueId;

    /**
     * 批次ID
     */
    private Long batchId;

    /**
     * 教材ID
     */
    private Long textbookId;

    /**
     * 班级ID
     */
    private Long classId;

    /**
     * 学生ID
     */
    private Long studentId;

    /**
     * 学生人数
     */
    private Integer studentCount;

    /**
     * 应发放数量
     */
    private Integer issueQuantity;

    /**
     * 实际领取数量
     */
    private Integer actualQuantity;

    /**
     * 状态
     */
    private Object issueStatus;

    /**
     * 发放日期
     */
    private Date issueDate;

    /**
     * 负责教师ID
     */
    private Long responsibleTeacher;

    /**
     * 领取人姓名
     */
    private String receiverName;

    /**
     * 领取人签名
     */
    private String receiverSignature;

    /**
     * 发放备注
     */
    private String remark;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TextbookIssue other = (TextbookIssue) that;
        return (this.getIssueId() == null ? other.getIssueId() == null : this.getIssueId().equals(other.getIssueId()))
            && (this.getBatchId() == null ? other.getBatchId() == null : this.getBatchId().equals(other.getBatchId()))
            && (this.getTextbookId() == null ? other.getTextbookId() == null : this.getTextbookId().equals(other.getTextbookId()))
            && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getStudentCount() == null ? other.getStudentCount() == null : this.getStudentCount().equals(other.getStudentCount()))
            && (this.getIssueQuantity() == null ? other.getIssueQuantity() == null : this.getIssueQuantity().equals(other.getIssueQuantity()))
            && (this.getActualQuantity() == null ? other.getActualQuantity() == null : this.getActualQuantity().equals(other.getActualQuantity()))
            && (this.getIssueStatus() == null ? other.getIssueStatus() == null : this.getIssueStatus().equals(other.getIssueStatus()))
            && (this.getIssueDate() == null ? other.getIssueDate() == null : this.getIssueDate().equals(other.getIssueDate()))
            && (this.getResponsibleTeacher() == null ? other.getResponsibleTeacher() == null : this.getResponsibleTeacher().equals(other.getResponsibleTeacher()))
            && (this.getReceiverName() == null ? other.getReceiverName() == null : this.getReceiverName().equals(other.getReceiverName()))
            && (this.getReceiverSignature() == null ? other.getReceiverSignature() == null : this.getReceiverSignature().equals(other.getReceiverSignature()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getIssueId() == null) ? 0 : getIssueId().hashCode());
        result = prime * result + ((getBatchId() == null) ? 0 : getBatchId().hashCode());
        result = prime * result + ((getTextbookId() == null) ? 0 : getTextbookId().hashCode());
        result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getStudentCount() == null) ? 0 : getStudentCount().hashCode());
        result = prime * result + ((getIssueQuantity() == null) ? 0 : getIssueQuantity().hashCode());
        result = prime * result + ((getActualQuantity() == null) ? 0 : getActualQuantity().hashCode());
        result = prime * result + ((getIssueStatus() == null) ? 0 : getIssueStatus().hashCode());
        result = prime * result + ((getIssueDate() == null) ? 0 : getIssueDate().hashCode());
        result = prime * result + ((getResponsibleTeacher() == null) ? 0 : getResponsibleTeacher().hashCode());
        result = prime * result + ((getReceiverName() == null) ? 0 : getReceiverName().hashCode());
        result = prime * result + ((getReceiverSignature() == null) ? 0 : getReceiverSignature().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", issueId=").append(issueId);
        sb.append(", batchId=").append(batchId);
        sb.append(", textbookId=").append(textbookId);
        sb.append(", classId=").append(classId);
        sb.append(", studentId=").append(studentId);
        sb.append(", studentCount=").append(studentCount);
        sb.append(", issueQuantity=").append(issueQuantity);
        sb.append(", actualQuantity=").append(actualQuantity);
        sb.append(", issueStatus=").append(issueStatus);
        sb.append(", issueDate=").append(issueDate);
        sb.append(", responsibleTeacher=").append(responsibleTeacher);
        sb.append(", receiverName=").append(receiverName);
        sb.append(", receiverSignature=").append(receiverSignature);
        sb.append(", remark=").append(remark);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append("]");
        return sb.toString();
    }
}